package com.shop.admin.vo;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.shop.admin.valid.AddGroup;
import com.shop.admin.valid.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class OrderListVo {
    /**
     * 商品id
     */
    @NotNull(message = "修改必须指定id",groups = {UpdateGroup.class})
    @Null(message = "新增不能指定id",groups = {AddGroup.class})
    private Long orderId;
    /**
     * 商品名字
     */
    @NotBlank(message = "商品名必须提交",groups = {AddGroup.class,UpdateGroup.class})
    private String orderName;
    /**
     * 显示状态[0-不显示；1-显示]
     */
    @TableLogic(value = "1",delval = "0")
    private Long showStatus;
    /**
     * 分类id
     */
//    @NotBlank(message = "分类必须提交",groups = {AddGroup.class,UpdateGroup.class})
    private Integer catelogId;
    /**
     * 分类名字
     */
    private String cateName;
    /**
     * 价格
     */
    @NotNull(groups = {AddGroup.class, UpdateGroup.class})
    private BigDecimal price;
    /**
     * 优惠价
     */
    @NotNull(groups = {AddGroup.class, UpdateGroup.class})
    private BigDecimal priceDiscounts;
    /**
     * 成本价
     */
    private BigDecimal priceCost;
    /**
     * 销量
     */
    private Long saleCount;
    /**
     * 库存
     */
    @NotNull(groups = {AddGroup.class, UpdateGroup.class})
    private Integer stockCount;
    /**
     * 商品描述
     */
    private String orderDescribed;
    /**
     * 秒杀标记
     */
    private Integer seckill;
    /**
     * 图片集
     */
    private List<Images> imagesList;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 更新时间
     */
    private Date updateTime;
    /**
     * 组织id
     */
    private Integer orgId;
}
